home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 75 / MOBICLIC 75.ISO / pc / DATA / TCHATCHE / doggy75-84.cst / 00071_Script_gestionnaires son < prev    next >
Text File  |  2005-06-13  |  3KB  |  116 lines

  1. -- Gestionnaires langues gΘnΘraux
  2.  
  3. global nivSon,dernierSon,musEnCours
  4. global pisteFondMascotte,langue
  5. global laboActif,laboOk,laboH,laboV,pisteLabo
  6. global interLangues,gInterface
  7. global moduleUtilise,boutLect
  8.  
  9. on joueSonMP3 nom, n
  10.   if the paramCount=2 then
  11.     joueson nom,n
  12.   else
  13.     joueSon nom,3
  14.   end if
  15. end joueSonMP3
  16.  
  17. on mascotteParle son
  18.   sprite(pisteFondMascotte+1).visible = 0
  19.   sprite(pisteFondMascotte+2).member = member("mascotteParle_" & suffixeLangue())
  20.   sprite(pisteFondMascotte+2).visible = 1
  21.   sound(3).pan = 60
  22.   joueson son & suffixeLangue()
  23. end
  24.  
  25. on mascotteGagne son
  26.   sprite(pisteFondMascotte+1).visible = 0
  27.   sprite(pisteFondMascotte+2).member = member("mascotteGagne_" & suffixeLangue())
  28.   sprite(pisteFondMascotte+2).visible = 1
  29.   sound(3).pan = 60
  30.   joueson son & suffixeLangue()
  31. end
  32.  
  33. on mascotteEchec son
  34.   sprite(pisteFondMascotte+1).visible = 0
  35.   sprite(pisteFondMascotte+2).member = member("mascotteEchec_" & suffixeLangue())
  36.   sprite(pisteFondMascotte+2).visible = 1
  37.   sound(3).pan = 60
  38.   joueson son & suffixeLangue()
  39. end
  40.  
  41. on suffixeLangue
  42.   case langue of
  43.     1: return "a"
  44.     2: return "b"
  45.     3: return "c"
  46.     4: return "d"
  47.   end case
  48. end
  49.  
  50. -- ouverture du laboratoire de langues
  51. on anciennepaletteLabo
  52.   if soundBusy(1) then
  53.     musEnCours=sound(1).member
  54.     sound(1).stop()
  55.   end if
  56.   
  57.   boutLect = 0
  58.   -- dΘtection du module de la palette labo α utiliser -----------
  59.   nomFilm = _movie.Name
  60.   
  61.   if nomFilm contains "tcha01" or nomFilm contains "tcha03" then
  62.     moduleUtilise = "voc"
  63.   end if
  64.   if nomFilm contains "tcha02" then
  65.     moduleUtilise = "dia"
  66.   end if
  67.   if nomFilm contains "tcha04" then
  68.     moduleUtilise = "jeu"
  69.   end if
  70.   
  71.   -- affichage de la palette labo --------------------------------
  72.   laboActif = 1
  73.   
  74.   window().new("paletteLabo")
  75.   window("paletteLabo").fileName = _movie.path & "paletteLabo"
  76.   
  77.   L = 342 -- largeur de la fenΩtre
  78.   H = 332 -- hauteur de la fenΩtre
  79.   if voidP(laboH) then laboH=((640-L)/2) + _movie.stage.rect[1]
  80.   if voidP(laboV) then laboV=((480-H)/2) + _movie.stage.rect[2]
  81.   
  82.   window("paletteLabo").rect = rect(laboH,laboV,laboH+L,laboV+H-1)
  83.   window("paletteLabo").title = "Labo"
  84.   window("paletteLabo").open()
  85. end
  86.  
  87. on lanceLabo
  88.   _movie.go(1,"Tcha05")
  89. end
  90.  
  91. on repriseMusique
  92.   --  if laboActif<>1 and soundBusy(1)=0 and musEnCours<>"" then
  93.   --    niveauSon
  94.   --    sound(1).play(member musEnCours)
  95.   --  end if
  96. end
  97.  
  98. on laboOn
  99.   laboOK=1
  100.   sprite(pisteLabo).member = member("Micro0")
  101. end
  102.  
  103. on laboOff
  104.   laboOK=0
  105.   sprite(pisteLabo).member = member("Micro2")
  106. end
  107.  
  108. on interfaceOff
  109.   interLangues=0
  110.   gInterface=0
  111. end
  112.  
  113. on interfaceOn
  114.   interlangues=1
  115.   gInterface=1
  116. end